//
// Created by 86156 on 25-8-27.
//

#include "view.h"
#include "cmsis_os2.h"
#include "view_driver.h"

extern osSemaphoreId_t ViewSemBinaryHandle;

void view_task(void *argument) {
    View_Init();
    for (;;) {
        osStatus_t ret = osSemaphoreAcquire(ViewSemBinaryHandle, 200);
        if (ret == osOK)//osOK：操作成功完成
        {
            View_Decode(View_RxBuffer,sizeof(View_RxBuffer));
            View_Connected = 1;
            View_Init();
        }
        else
        {
            View_Connected = 0;
            View_Init();
        }
    }


}

